package com.glorystone.ins.dao;

import com.glorystone.ins.common.common.PageVo;
import com.glorystone.ins.common.common.Pageable;
import com.glorystone.ins.domain.CreditTotal;
import com.glorystone.ins.interceptor.PageList;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

/**
 * Created by wangwei on 2018/3/12.
 */
public interface CreditTotalMapper {

    CreditTotal findCurrentByChannelId(Long channelId);

    CreditTotal findOneInWorkFlow(@Param("channelId") Long channelId);

    PageList<CreditTotal> findHistoryList(@Param("vo") PageVo vo, Pageable pageable);

    void save(CreditTotal total);


    void update(CreditTotal total);

    CreditTotal findInTime(@Param("channelId") Long channelId, @Param("date") LocalDate date);

    void updateOffByChannelIds(List<Long> channelIds);

    List<CreditTotal> findActiveList();

    CreditTotal findPrePhase(Long channelId);
}
